This application is based upon and claims priority from prior French Patent Application No. 98-12693, filed Oct. 9, 1998, the entire disclosure of which is herein incorporated by reference.
1. Field of the Invention
The present invention relates to displays, and more specifically to a method and circuit for forming high quality on-screen displays for overlay on a video image with economical memory space requirements.
2. Description of Related Art
A video image is formed by a sequence of lines of pixels. The pixels are elementary picture elements. In color television systems, each pixel is a carrier of luminance information and chrominance information that makes it possible to specify the luminosity and color of each image point. In the most commonly used television systems, the image develops according to a principle of horizontal scanning of the screen. Whether it is the NTSC television system, the PAL television system, or the SECAM television system, each image displayed results from the alternating display of two distinct partial images known as frames. In general, there is a first frame, which is known as an odd-parity frame, and a second frame which is known as an even-parity frame.
FIG. 1a shows a television screen 10 with a view of a set of lines 11 of the displayed image. The lines, which are numbered as 11, 12, 13, and so on, are formed by a succession of pixels. The visible image on the television screen 10 of FIG. 1a corresponds to the interlacing of two partial images. In particular, FIG. 1b shows a first partial image that consists of the odd-parity lines of the final image, and FIG. 1c shows a second partial image that consists of the even-parity lines of the final image. The first partial image corresponds to the odd-parity frame of the image, and the second partial image corresponds to the even-parity frame of the image.
The number of lines displayed during the depiction of a video image depends on the television system used. For example, the NTSC television system has images formed by 480 video lines that are almost horizontal. This corresponds to the interlacing of an odd-parity frame and an even-parity frame of 240 lines each. In all of the television systems referred to above, the refreshing frequency of the video image is half of the refreshing frequency of the frame. For example, in the NTSC television system, an entire new image appears every {fraction (1/30)} seconds (which corresponds to a refresh frequency of 30 Hz) whereas a new frame (alternately the odd-parity frame and the even-parity frame) is refreshed every {fraction (1/60)} seconds (which corresponds to a refresh frequency of 60 Hz). In the PAL and SECAM television systems, the refresh frequency of the entire image is 25 Hz.
The very nature of television images (i.e., the interlacing of two partial images) gives rise to problems of image quality and flicker. In an extreme case, a line of black pixels on a white image background gives the human eye the unpleasant impression of appearing and disappearing, especially if this line is observed from a close distance. Furthermore, it is increasingly common to present on-screen displays (OSDs) that are overlaid on video images. Each pixel of an OSD is characterized by three values Y, U, and V that determine luminosity and color and a value MW for transparency. For example, OSDs are commonly used to provide a permanent or non-permanent indication of the progress of a sporting event, such as the score of a match. OSDs are also used by certain television channels to show their logo so as to indicate to the viewer the television channel that is being watched.
FIG. 2 shows a conventional structure for the code of an OSD. A binary train 20 containing the codes needed to display an OSD typically consists of three sets of bits that have different functions. A first set of bits 22 forms the OSD header. The OSD header 22 has information on the number of bits needed to define a pixel, and information on the coordinates of certain characteristic points of the OSD. A second set of bits 24 is used to define the panel of colors that will be used during the display of the OSD. All of the colors that will be used are stored in a memory known as a color look-up table (CLUT). Generally, the CLUT is limited to 256 memory lines, with each memory line containing the values of the bits corresponding to a color programmed in a table through the second set of bits 24. Additionally, a third set of bits 26 is formed by the addresses of the memory lines of the table of the available colors containing the appropriate color for each pixel of the OSD.
While flicker problems exist, in purely analog television pictures they are small as compared with the flicker phenomena that can appear when digital on-screen displays are presented on a video image background. In particular, for a standard analog television signal, the resolution and the contrast between lines are relatively low. Regardless, the refresh frequency of the image under the different analog television systems is acceptable for the human eye. At an average distance for the viewer, the flicker phenomenon is not perceivable. Further, in video pictures without overlay, an attenuation of contrasts is performed automatically due to the use of a camera in creating the image because commonly used cameras cannot reliably render the transitions between colors that are far distant from each other in the spectrum of visible frequencies. Thus, inappropriate colors appear randomly at the transitions between certain colors. This phenomenon is known as aliasing.
On the other hand, major contrasts may appear between two consecutive lines when digital on-screen displays are overlaid on the video image. Further, when an OSD is created, the background of the video image on which the OSD will be displayed is not generally known. Thus, in extreme cases, a blue OSD may be displayed when the background of the video image is red. Additionally, nothing prevents the designer of an OSD from juxtaposing two lines with high contrast with respect to each other in the OSD itself. The automatic attenuation of contrasts does not arise during the creation of an OSD because of the absence of the camera in the image generation cycle. Two patterns of distant colors in the spectrum of visible frequencies may be juxtaposed.
FIGS. 3a and 3b illustrate problems that can be encountered during the display of an OSD on a video image background. FIG. 3a shows a television screen that is displaying an OSD 30 on a video image background 32. The OSD 30 shows a zone with a white background from which there emerges a thin black line with the width of a pixel. This is typically the case where the flicker effect is the most visible. Due to the interlacing of the even-parity and odd-parity frames, the thin black line 34 appears and disappears at a speed that is low enough for this phenomenon to be detected by the human eye.
FIG. 3b shows another problem related to the display of an OSD on a video image background. On the background of a video image 32, an OSD 30 is formed by a first pattern 36 that is displayed with the even-parity frame and a second pattern 38 that is displayed with the odd-parity frame. This gives an impression of flutter 39. More specifically, the OSD seems to rise and fall the amplitude of a pixel at a rate dictated by the refresh frequency of the frames of the image. This flutter problem has the same cause as the flicker problem. The phenomenon of flutter appears when the same image is displayed by the even-parity frame and by the odd-parity frame. Depending on the television system used, the even-parity frame appears every {fraction (1/25)} seconds or every {fraction (1/30)} seconds in alternation with the odd-parity frame. The human eye detects a flutter motion due to the appearance of the OSD alternately on one set of lines and then on the set of directly neighboring lines.
These phenomena of flicker and flutter are mainly perceived when long horizontal lines are displayed on the screen, which is frequent in OSDs. There are several conventional approaches to overcoming these problems of vertical transition in the definition of an image having one or more OSDs. For example, it is possible to act on the transparency of each pixel of an OSD. To avoid sudden transitions of color, it is possible to apply mathematical filters that use the values of neighboring pixels and weighting to compute new values of these pixels. Furthermore, there are circuits that automatically detect excessive color contrasts between successive lines. These circuits then automatically carry out the weighting operations associated with the appropriate mathematical filter.
To apply mathematical filters to the pixels, it is necessary to keep the data needed by the computations for the mathematical filter in memory. For each pixel implicated in computations for a mathematical filter, it is often necessary to store in memory the data bits that correspond to the values of that pixel (i.e., typically 30 bits: 8 bits for each value Y, U, and V for the luminosity and color, and 6 bits for the transparency. This type of approach creates a drawback in that a substantial memory space is required, especially with typical mathematical filters that are applied to large-sized horizontal segments. Furthermore, the memories used in such applications typically must be small capacity memories.
In view of these drawbacks, it is an object of the present invention to overcome the above-mentioned drawbacks and to provide a method for displaying high quality OSDs on a video image. The method improves the quality of the vertical transitions within the OSDs themselves and at the horizontal boundaries between the OSD and the video image by bringing into play the table of colors available during the implementation of a mathematical filters and taking pixels of the adjacent lines into consideration.
One embodiment of the present invention provides a method for displaying an OSD on a video image. According to the method, values of pixels of the OSD are stored, and pixels of lines of the OSD that are to be displayed without processing are displayed by making direct use of a color look-up table. Additionally, pixels of lines of the OSD that are to be displayed after processing with a mathematical filter and/or that are required for computations associated with the mathematical filter are processed. In the processing step, the pixels of the lines to be processed are stored in the form of addresses that designate the memory lines of the color look-up table, the values of the pixels of the lines to be processed are obtained by an addressing of the color look-up table, and a mathematical filter is applied to the obtained values of the pixels to be processed. In a preferred embodiment, for the pixels of each line being processed, the addresses designating the memory lines of the color look-up table are distributed between a master unit and a slave unit.
Another embodiment of the present invention provides a device for displaying an OSD on a video image. The device includes a processing interface, a first memory module, a color look-up table capable of being addressed by both the processing interface and the first memory module, an OSD insertion module, and a control unit. For each pixel, the control unit selectively sends data elements from the color look-up table to either the processing interface or the OSD insertion module. In one preferred embodiment, the device also includes a logic unit that sends the data elements from the color look-up table to either the processing interface or the OSD insertion module based on a control signal from the control unit.
Other objects, features, and advantages of the present invention will become apparent from the following detailed description. It should be understood, however, that the detailed description and specific examples, while indicating preferred embodiments of the present invention, are given by way of illustration only and various modifications may naturally be performed without deviating from the present invention.